<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script>
    for (var i = 1; i <= 100; i++) {
      console.log(i);   // 输出1、2、3、4、5、6……100
    }

    var i = 1;
    while (i <= 100) {
      console.log(i);
      i++;
    }

    var i = 1;
    do {
      console.log(i);
      i++;
    } while (i <= 100)
  </script>
</body>
</html>